<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>任务一：零基础JavaScript编码（一）</title>

	<style type="text/css">
		* {
			padding: 0;
			margin: 0;
			box-sizing: border-box;
		}
		.content {
			width: 400px;
			height: 200px;
			margin: 100px auto;
		}
	</style>
</head>
<body>
<div class="content">
	<label>亲输入：<input type="text" name="" id="aqi-input"></label><button id="button">确认填写</button>
	<br/><label>您输入的值是：<span id="aqi-display"></span></label>
</div>
<script type="text/javascript">
	(function(){
		var button = document.getElementById("button");
		
		button.addEventListener("click",function(){
			var aqi = document.getElementById("aqi-input").value;
			var aqidisplay = document.getElementById("aqi-display");
			aqidisplay.innerHTML =aqi;
		});
	})();
</script>
</body>
</html>